﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class MessageBox : MonoBehaviour {

	// Use this for initialization

    [SerializeField]
    Text mainMessage;




    public void DisplayMessage(string msg)
    {

        mainMessage.text=msg;

    }
    public static void ShowMessage(string msg)
    {


        MessageBox box=FindObjectOfType<MessageBox>();

        if (box!=null)
        {

            box.DisplayMessage(msg);

        }


    }
}
